import axios from 'axios';
export default {
    getGoogsinfo() {
        return axios.get('/api/goods').then(res => {
            //加个冒号取别名
            const { code, slider, data: goodsinfo, keys } = res.data;
            if (code) {
                return { goodsinfo, slider, keys }
            } else {
                return null;
            }
        })

    }
}